/*=============================================================================
#    The element-comm is a tentative program used to test our ideas.           
#                       Copyright (C)  bgao                                    
#
#     This program is free software; you can redistribute it and/or            
#      modify it under the terms of the GNU General Public License             
#     as published by the Free Software Foundation; either version 2           
#         of the License, or (at your option) any later version.               
#
#     This program is distributed in the hope that it will be useful,          
#    but WITHOUT ANY WARRANTY; without even the implied warranty of           
#     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the            
#             GNU General Public License for more details.                    
#
#    You should have received a copy of the GNU General Public License        
#     along with this program; if not, write to the Free Software             
#      Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,             
#                       MA  02110-1301, USA.                                  
#==============================================================================
# $Id$ 
#
# $Author$ 
#
# $Revision$ 
#
# $Date$ 
#
# Description: 
#
=============================================================================*/
#include "rtos-wsn.h"
#include "cc2420.h"
#include "wsn-demodst-bind.h"



unsigned char out_buf[11] = { 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };


int INPUT_SPID(uint8 value)//INPUT_DEMODST_SPID()
{
	uint8 status;

	out_buf[10] = value;
	status = cc2420_command(CC2420_SFLUSHTX);    // Flush TX fifo 

	WSN_DebugOut("STATUS = %X\n\r", status);

	cc2420_write_fifo(out_buf, 11);
	cc2420_command(CC2420_STXON);
	status = cc2420_command(0);

	WSN_DebugOut("STATUS = %X\n\r", status);
	return 1;
}
